Sort Method

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Sorts the list in place.

Namespace: Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax

C#
public void Sort()
Visual Basic (Declaration)
Public Sub Sort
Visual C++
public:
void Sort ()

Remarks

The Quicksort algorithm is used to sort the items. In virtually all cases, this takes time O(N log N), where N is the number of items in the list.

Values are compared by using the IComparable or IComparable<T> interface implementation on the type T.

Exceptions

ExceptionCondition
System..::InvalidOperationExceptionThe type T does not implement either the IComparable or IComparable<T> interfaces.

See Also